<template>
  <div class="content">
    <el-button type="primary" round @click="router.go(-1)" class="btn">返回</el-button>
  <el-form :model="form" label-width="120px">
    <el-form-item label="家长代请假审批人">
      <el-radio-group v-model="form.parents">
        <el-radio label="仅班主任" />
        <el-radio label="默认班主任，可选其他老师" />
      </el-radio-group>
    </el-form-item>
    <el-form-item label="学生发起请假审批人">
      <el-radio-group v-model="form.students">
        <el-radio label="仅班主任" />
        <el-radio label="默认班主任，可选其他老师" />
      </el-radio-group>
    </el-form-item>
    <el-form-item label="审批通过通知">
      <el-checkbox-group v-model="form.type">
        <el-checkbox label="班主任" name="type" />
        <el-checkbox label="任课老师" name="type" />
        <el-checkbox label="行政主任" name="type" />
      </el-checkbox-group>
    </el-form-item>
    <el-form-item label="请假需家长确认">
      <el-checkbox-group v-model="form.confirm">
        <el-checkbox label="开启" name="type" />
      </el-checkbox-group>
    </el-form-item>
    
    <el-form-item>
      <el-button type="primary" @click="onSubmit">保存</el-button>
      <!-- <el-button>Cancel</el-button> -->
    </el-form-item>
  </el-form>
  </div>
  
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router'
import { reactive } from 'vue'
var router = useRouter()
// do not use same name with ref
const form = reactive({
  parents: '',
  students: '',
  type: '',
  date2: '',
  confirm: '',
})

const onSubmit = () => {
  console.log('submit!')
}
</script>
  
<style scoped>
.el-form-item__content{
  margin-left: 10px;
}
</style>